package com.springboot.ww.platform.pd.lms.api;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2024-07-20 15:31
 */
@NoArgsConstructor
@Data
public class PdAddListingResp {
    @JsonProperty("result")
    private ResultDTO result;
    @JsonProperty("success")
    private Boolean success;
    @JsonProperty("requestId")
    private String requestId;
    @JsonProperty("errorCode")
    private Integer errorCode;
    @JsonProperty("errorMsg")
    private String errorMsg;

    @NoArgsConstructor
    @Data
    public static class ResultDTO {
        @JsonProperty("productSkuList")
        private List<ProductSkuListDTO> productSkuList;
        @JsonProperty("productId")
        private String productId;
        @JsonProperty("productSkcList")
        private List<ProductSkcListDTO> productSkcList;

        @NoArgsConstructor
        @Data
        public static class ProductSkuListDTO {
            @JsonProperty("productSkuId")
            private String productSkuId;
            @JsonProperty("extCode")
            private String extCode;
            @JsonProperty("skuSpecList")
            private List<SkuSpecListDTO> skuSpecList;
            @JsonProperty("productSkcId")
            private String productSkcId;

            @NoArgsConstructor
            @Data
            public static class SkuSpecListDTO {
                @JsonProperty("specId")
                private Long specId;
                @JsonProperty("parentSpecName")
                private String parentSpecName;
                @JsonProperty("specName")
                private String specName;
                @JsonProperty("parentSpecId")
                private Long parentSpecId;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ProductSkcListDTO {
            @JsonProperty("productSkcId")
            private String productSkcId;
        }
    }
}
